#ifndef PROXY_CLIENT_BASE_PROXY_BASE_H_
#define PROXY_CLIENT_BASE_PROXY_BASE_H_

#include "vzconn/base/basicdefines.h"
#include "vzconn/base/bytebuffer.h"
#include <deque>
//#include "glog/logging.h"

namespace proxy{

  const char HTTP_CONNECT_METHOD[] = "CONNECT";
  const char CONTENT_LENTH[] = "Content-Length";
  const char PROXY_CONNECTION[] = "Proxy-Connection";
  const char CONNECTION[] = "Connection";
  const char CONNECTION_CLOSE[] = "close";

  const char REMOVE_REQUEST_HEADERS[][32] = {
    //"host",
    "keep-alive",
    "te",
    "trailers",
    "upgrade"
  };
  const int SIZEOF_REMVOE_REQUEST_HEADERS = 6;

  const char JSON_NODE_TYPE[] = "node_type";

  const char JSON_BIND_ADDR[] = "bind_addr";
  const char JSON_BIND_PORT[] = "bind_port";
  const char JSON_CENTER_SERVER_ADDR[] = "center_addr";
  const char JSON_CENTER_SERVER_PORT[] = "center_port";
  const char JSON_PROXY_ADDR[] = "proxy_addr";
  const char JSON_PROXY_PORT[] = "proxy_port";

  const char JSON_FAKE_SERVER_DOMAIN[] = "fake_domain";
  const char JSON_FAKE_SERVER_LOCATION[] = "fake_location";
  const char JSON_FAKE_SERVER_COMMIT[] = "fake_commit";
  const char JSON_THREAD_NUMBER[] = "thread_num";

  const char JSON_CENTER_SERVER_HOST_URL[] = "host_url";
  const char JSON_CENTER_SERVER_PING_URL[] = "ping_url";

  const char JSON_PING_TIMEOUT[] = "ping_timeout";

  const char EXAPMLE_JSON_DATA[] = "{bind_addr:}";

  typedef boost::shared_ptr<boost::asio::ip::tcp::socket> socket_ptr;
  typedef boost::weak_ptr<boost::asio::ip::tcp::socket> socket_wptr;
  typedef boost::shared_ptr<boost::asio::io_service> io_service_ptr;

  typedef std::deque<io_service_ptr> ios_deque;

  const char PING_ERROR_CODE_STR[] = "code";
  const int PING_ERROR_CODE_UNKOWN = 100;
  const int PING_ERROR_CODE_TIME_EXCEED = 101;
  const int PING_ERROR_CODE_FLOWN_EXCEED = 102;
  const int PING_ERROR_CODE_PARAM_ERROR = 103;
  const int PING_ERROR_CODE_OK = 200;
  const char WINDOW_FTP_DOWNLOAD_KEY_NAME[] = "file_key";
  const char WINDOW_CLIENT_VERSION_KEY[] = "win_version";
  const char WINDOW_CLIENT_FTP_URL[] = "win_ftp_url";
  const char WINDOW_CLIENT_C_FTP_AUTHEN[] = "authen";
  const char FAILURE_TO_CONNECT_SERVER[] = "{\"code\":100}";
  const char CLIENT_REMAIN_TIME[] = "remain_time";


  const int MESSAGE_OK_SUCCEED = 0x00;
  const int REGISTER_ERROR_CODE = 0X01;
  const int DISCONNECT_SERVER_TIMEOUT = 0X02;
  const int PARSE_PING_JSON_ERROR = 0x03;
  const int CLIENT_VERSION_KERY_ERROR = 0x04;
  const int CLIENT_REMAIN_TIME_EXCEED = 0x05;
  const int CLIENT_DOWNLOAD_NEW_UPDATE_ERROR = 0x06;


}

#endif // PROXY_CLIENT_BASE_PROXY_BASE_H_